-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ALTER TABLE DROP PRIMARY KEY
#682
Conversation
Pull Request Test Coverage Report for Build 3364446229
💛 - Coveralls |
src/parser.rs
Outdated
@@ -3136,6 +3136,9 @@ impl<'a> Parser<'a> { | |||
name, | |||
cascade, | |||
} | |||
} else if self.parse_keyword(Keyword::PRIMARY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ding-young ALTER TABLE tb DROP PRIMARY
isn't allowed and, therefore, shouldn't be acceptable.
The let _
in the next line is permissive over this.
Also, I think this is a MySQL-specific statement. Could you please add the validation to accept only MySQL
and GenericDialect
, please?
ALTER TABLE DROP PRIMARY KEY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ding-young do you have time to implement @AugustoFKL 's suggestion? Otherwise this PR looks good to me
Yes, I'll work on it soon. |
@AugustoFKL Thank you for feedback. I changed the code 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@alamb ready for approval :)
Thanks @ding-young and @AugustoFKL ! |
Issue
resolves #591